package com.cq.hd.member.api;

import com.cq.hd.common.response.Result;
import com.cq.hd.member.api.dto.WxSubscribeRecordSaveDto;
import com.cq.hd.member.api.vo.WxSubscribeRecordVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

@FeignClient(value = "hd-o2o-member-service", contextId = "wx-subscribe-record-api")
public interface TbWxSubscribeRecordApi {

    // 保存关注记录
    @PostMapping("/member/wxSubscribeRecord/saveWxSubscribeRecord")
    Result<Boolean> saveWxSubscribeRecord(@RequestBody WxSubscribeRecordSaveDto wxSubscribeRecordSaveDto);

    // 删除关注记录
    @DeleteMapping("/member/wxSubscribeRecord/delByOpenId")
    Result<Boolean> delByOpenId(@RequestParam("openid") String openid);

    // 根据userId获取关注记录
    @GetMapping("/member/wxSubscribeRecord/getByUserId")
    Result<WxSubscribeRecordVo> getByUserId(@RequestParam("userId") Long openid);
}
